<f:view
		xmlns="http://www.w3.org/1999/xhtml"
		xmlns:h="http://java.sun.com/jsf/html"
		xmlns:f="http://java.sun.com/jsf/core"
		xmlns:a4j="http://richfaces.org/a4j"
		xmlns:rich="http://richfaces.org/rich"
		xmlns:ui="http://java.sun.com/jsf/facelets"
		xmlns:itdep="http://itdep.bsuir.by/jsf" xmlns:t="http://myfaces.apache.org/tomahawk"
		>

	<ui:decorate template="/facelets/template/mainTemplate.xhtml">
		<ui:define name="title">#{commonBundle.title}</ui:define>
		<ui:define name="center">
			<ui:decorate template="/facelets/template/centerTemplate.xhtml">
				<ui:define name="content">

					<ui:decorate template="/facelets/template/tableTemplate.xhtml">
						<ui:param name="showAddLink" value="true"/>
						<ui:param name="actionBean" value="#{flagBean}"/>
						<ui:param name="idPrefix" value="flagTable"/>
						<ui:define name="editPanelContext">
							<h:panelGrid columns="2">
								<t:inputFileUpload id="uploadedFile" required="true" immediate="true"
												   value="#{flagBean.uploadedFile}"/>
								<h:panelGroup>
									<h:outputText value="File size restricted!" rendered="#{flagBean.rendFaild}"
												  styleClass="errorMessage"/>
									<h:message for="uploadedFile" styleClass="errorMessage" showSummary="true"
											   showDetail="false"/>
								</h:panelGroup>
								<h:panelGroup>
									<h:outputText value="#{dictionaryBundle.dictionaryDescription}"/>
									<rich:spacer width="25"/>
									<h:inputText value="#{flagBean.record.description}"/>
								</h:panelGroup>
								<h:commandLink action="#{flagBean.submit}"
											   value="#{commonBundle.upload}"
											   styleClass="buttonPhoto"/>
							</h:panelGrid>
						</ui:define>
						<ui:define name="tableContext">
							<rich:column>
								<f:facet name="header">
									<h:outputText value="Student flags"/>
								</f:facet>

								<div class="graphicImageInList">
									<a4j:mediaOutput element="img" styleClass="graphicImage noBorder"
													 rendered="#{not empty record.userMark}"
													 value="#{record.userMark}"
													 createContent="#{flagBean.paint}"/>
								</div>
							</rich:column>
							<rich:column>
								<f:facet name="header">
									<h:outputText value="#{dictionaryBundle.dictionaryDescription}"/>
								</f:facet>
								<h:outputText value="#{record.description}"/>
							</rich:column>
						</ui:define>
					</ui:decorate>
				</ui:define>
			</ui:decorate>
		</ui:define>
	</ui:decorate>
</f:view>